package com.nbsaas.boot.job.data.entity;


import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import com.nbsaas.boot.jpa.data.entity.User;
import lombok.Data;

import javax.persistence.*;


@FormAnnotation(title = "职位管理", model = "职位", menu = "1,57,69")
@CreateByUser
@Data
@Entity
@Table(name = "bs_job")
public class Job extends AbstractEntity {


    @SearchItem(label = "职位名称", name = "name")
    @FormField(title = "职位名称", grid = true, col = 22, required = true, width = "200")
    private String name;

    @FormField(title = "招聘人数", grid = true, col = 22, type = InputType.el_input_number)
    private Integer num;

    @FormField(title = "工资", grid = true, col = 22)
    private String wages;

    @FormField(title = "工作城市", col = 22)
    private String workCity;

    @FormField(title = "联系方式", col = 22, type = InputType.textarea)
    private String contactData;

    @Column(length = 500)
    @FormField(title = "岗位职责", col = 22, type = InputType.textarea)
    private String duty;

    private Integer sortNum;

    @Column(length = 2000)
    @FormField(title = "岗位要求", col = 22, type = InputType.richText)
    private String note;

    @FieldConvert
    @ManyToOne(fetch = FetchType.LAZY)
    private User creator;


}
